1. Field of the Invention
The present invention relates to an image processing apparatus which determines whether an input data is image data generated by data processing such as PDL image data, or optically scanned scan-in image data, more specifically to an apparatus which perform such determination for each of respective regions in an image data to allow such processing as encoding and decoding of image data containing both of the image partitions.
2. Discussion of the Related Art
In order to reduce an amount of data, image encoding has been carried out for images containing computer generated (CG) image created for DTP (desktop publishing), or data of character image or drawing image described by a page description language (PDL), which is referred to as PDL image data hereinbelow, and image data digitally converted from a hard copy by means of a scanner (hereinafter, scan-in image). For instance, image data of size of A4, resolution of 400 dpi (dot per inch), 256 levels of gradation by 4 colors may require a storage capacity of approximately 64 MB, whereas encoding allows a significant reduction of storage capacity or of transmission time.
For such image encoding scheme, one of irreversible general encoding methods of colored multi-value image data is JPEG-DCT method, described in "International Standard of Multimedia Encoding", pp. 18-43, Maruzen books.
JPEG-DCT method which is irreversible encoding method may achieve some better encoding efficiency for scan-in image data, while degradation of image quality may be occurred for PDL image data. JPEG-Spatial method which is reversible encoding method may not result in degraded quality of PDL image data, but compression ratio of scan-in image data will be less.
In order to overcome the problem of discrepancy, encoding methods have been studied which combines irreversible encoding scheme such as JPEG-DCT method and reversible encoding scheme such as JPEG-Spatial method.
In general, an encoding method combining reversible and irreversible encoding methods performs appropriate encoding for input image data by separating it into three types of data of: scan-in image data; PDL image data; and TAG data which is a bitmap switching between scan-in image data and PDL image data.
An exemplary image processing apparatus of the prior art is presented in FIG. 14, which performs an encoding scheme as described above.
In FIG. 14, reference numeral 101 designates to input image data, 102 to a separator circuit for separating input image data into scan-in image data, PDL image data, and TAG data, 103 to scan-in image data, 104 to PDL image data, 105 to TAG data, 106 to an encoder for encoding scan-in image data with a predetermined method, 107 to an encoder for encoding PDL image data with a predetermined method, 108 to an encoder for encoding TAG data with a predetermined method, 109 to encoded scan-in image data, 110 to encoded PDL image data, and 111 to encoded TAG data.
More specifically, input image data 101 is entered into the separator 102 which in turn separates it into scan-in image data 103, PDL image data 104, TAG data 105 which contains switching information between the scan-in image data portion and the PDL image data portion.
The scan-in image data 103 is encoded by the scan-in image encoder 106 with an irreversible encoding method such as JPEG-DCT, to output encoded scan-in image data 109. The PDL image data 104 is encoded by the PDL image data encoder 107 with a reversible encoding method such as JPEG-Spatial to output encoded PDL image data 110. Also, TAG data 105 is encoded by the TAG encoder 108 to output TAG encoded data 111.
As can be seen from the description above, scan-in image portion and PDL image portion within an input image is separated for each pixel by the TAG information in order to appropriately encode independently with an most effective encoding scheme.
More specific exemplary image processing apparatus as described above has been described in Japanese Published Unexamined Patent Application No. Hei 5-308529 (1993), which will be described below with reference to accompanying FIG. 15.
In FIG. 15, reference numeral 120 designates to input image data, 121 to a block forming circuit, 122 to a one-block-delay circuit, 123 to a histogram calculator, 124 to an extracted color determining circuit, 125 to a bitmap data encoder, 126 to a color data encoder, and 127 to a natural image data encoder.
In this image processing apparatus, input image data 120 is partitioned into 8 by 8 pixel blocks through the block forming circuit 121. For these block data, while the one-block-delay circuit 122 delays by one block, the histogram calculator 123 calculates a histogram of the pixel value in the input block data to transmit to the extracted color determining circuit 124 image data of maximum frequency of histogram. In the extracted color determining circuit 124, the input image information is compared with pixel data inputted pixel by pixel in which frequency of the histogram becomes maximum, if a match occurs then the pixel is encoded as "1", if not the pixel is encoded as "0" for transmitting to the bitmap data encoder 125. The bitmap data encoder 125 encodes such bitmap data to output TAG code data 131.
The density data computed in the histogram calculator 123 is also transmitted to the color data encoder 126 to be reversible encoded therein to be output as PDL image code data 130.
Furthermore, input image data grouped in blocks is transmitted to the natural image data encoder 127 to be irreversibly encoded to be output as scan-in image code data 129.
It should be appreciated that, in addition to the extraction of the PDL image data portion in the input image data by means of a histogram, there are known technologies extracting characters as technologies of digital copying machines for rendering high quality image. For example, a method described in the Japanese Published Unexamined Patent Application No. Hei 4-10765 (1992), separating an image into areas including characters and areas not including characters for providing high quality printing images, an area being determined as characters are treated such as edge enhancement and high resolution printing (400 dpi) in order to obtain high quality results.
In this method of the prior art, the process is performed by determining the distribution of density value for each respective pixel of image data and extracting areas where density value is abruptly changing as outline of characters.
However, the former method of the prior art of Japanese Published Unexamined Patent Application No. Hei 5-308529 has problems enumerated as (1) through (3) as described below, while the latter of Japanese Published Unexamined Patent Application No. Hei 4-10765 has problem as described below as (4):
(1) As the pixel having maximum frequency of the histogram is extracted, PDL image data comprised of plural color components may not be extracted.
For example, in the method above, only one line may be extracted for a PDL image data, even if there were plural lines of different colors. In addition, as shown in FIG. 17, part of image where density value of each of pixels is changing gradually as a gray scale, PDL image data cannot be extracted.
(2) Block distortion may often occur because the process is preceded by grouping of image data into blocks.
For example, as shown in FIG. 18, assuming that there are blocks A to D for determining the area in the image data, each block has 8 by 8 pixels, and that the shaded part shown in the figure is PDL image data. Then block C and block B have not enough number of pixels in the shaded area so that the shaded area may be determined to be PDL image data. However, in block A, the shaded area contains only one pixel, so that the area will be determined as a part of scan-in image data.
As a consequence, only pixels in the block A in the scan-in image data portion are irreversibly encoded. This results in that only one pixel in the PDL image of the shaded area which is a continuous drawing, and that apparently prompt degradation of image quality may be obtained.
(3) The large computation is required for determining the maximum frequency.
The worst case may require the number of computation of the determination of the equality of up to 2016 times, and the number of computation of the comparison of up to 63 times. This may cause the load of the process to be increased, as well as the processing time to be augmented.
(4) Extracted portion and PDL image area do not match because of extraction of the outline of character image.
For example, as shown in FIG. 19, an outline is extracted from character image. Since there exists areas inside a character which are not yet extracted, the encoding efficiency of the reversible encoding may be decreased when considering the entire image of that character. Also, outline is not extracted for the area of gradually changing as shown in FIG. 17, so that it will not be extracted as PDL image.